package stu.wingsmaker.artofsubway.view.activity;

import stu.wingsmaker.artofsubway.R;
import android.content.Intent;
import android.os.Bundle;

import com.actionbarsherlock.app.SherlockActivity;
import com.actionbarsherlock.view.Menu;

public class IntroActivity extends SherlockActivity {

	@Override
	public void onCreate(Bundle savedInstanceState) {
		super.onCreate(savedInstanceState);
		setContentView(R.layout.activity_intro);
		
		new Thread(new Runnable() {
			public void run() {
				try{
					Thread.sleep(2000);
				} catch (Throwable ex) {
					ex.printStackTrace();
				}
				Intent i = new Intent(IntroActivity.this, MainActivity.class);
				startActivity(i);
				finish();
				overridePendingTransition(android.R.anim.fade_in, android.R.anim.fade_out);
			}
		}).start();
	}

	@Override
	public boolean onCreateOptionsMenu(Menu menu) {
		// Inflate the menu; this adds items to the action bar if it is present.
		
		getSupportMenuInflater().inflate(R.menu.activity_intro, menu);
		return true;
	}

}
